/*    */ package system.staros.cblock1;
/*    */ 
/*    */ import java.io.FileInputStream;
/*    */ import java.io.FileNotFoundException;
/*    */ import java.io.IOException;
/*    */ import java.util.Hashtable;
/*    */ 
/*    */ public class FileClassLoader extends ClassLoader
/*    */ {
/* 15 */   private Hashtable cache = new Hashtable();
/*    */ 
/*    */   private byte[] loadClassData(String paramString) {
/* 18 */     FileInputStream localFileInputStream = null;
/* 19 */     int i = 0;
/* 20 */     byte[] arrayOfByte = null;
/*    */     try
/*    */     {
/* 23 */       localFileInputStream = new FileInputStream(paramString);
/*    */     }
/*    */     catch (FileNotFoundException localFileNotFoundException) {
/* 26 */       return null;
/*    */     }
/*    */ 
/*    */     try
/*    */     {
/* 31 */       i = localFileInputStream.available();
/*    */     }
/*    */     catch (IOException localIOException1) {
/* 34 */       return null;
/*    */     }
/*    */ 
/* 37 */     arrayOfByte = new byte[i];
/*    */     try
/*    */     {
/* 40 */       int j = localFileInputStream.read(arrayOfByte);
/* 41 */       localFileInputStream.close();
/*    */     }
/*    */     catch (IOException localIOException2) {
/* 44 */       return null;
/*    */     }
/*    */ 
/* 47 */     return arrayOfByte;
/*    */   }
/*    */ 
/*    */   public synchronized Class loadClass(String paramString, boolean paramBoolean)
/*    */     throws ClassNotFoundException
/*    */   {
/* 56 */     Class localClass = (Class)this.cache.get(paramString);
/* 57 */     if (localClass != null)
/*    */     {
/* 59 */       return localClass;
/*    */     }
/*    */ 
/*    */     try
/*    */     {
/* 64 */       return super.findSystemClass(paramString);
/*    */     }
/*    */     catch (ClassNotFoundException localClassNotFoundException)
/*    */     {
/* 72 */       byte[] arrayOfByte = loadClassData(paramString);
/* 73 */       if (arrayOfByte == null) {
/* 74 */         throw new ClassNotFoundException();
/*    */       }
/*    */ 
/* 78 */       localClass = defineClass(arrayOfByte, 0, arrayOfByte.length);
/* 79 */       if (localClass == null) {
/* 80 */         throw new ClassFormatError();
/*    */       }
/*    */ 
/* 83 */       if (paramBoolean) {
/* 84 */         resolveClass(localClass);
/*    */       }
/*    */ 
/* 88 */       this.cache.put(paramString, localClass);
/*    */     }
/* 90 */     return localClass;
/*    */   }
/*    */ }

/* Location:           D:\Марк\!IMPORTANT\staros\archive\version-2.260.zip
 * Qualified Name:     system.staros.cblock1.FileClassLoader
 * JD-Core Version:    0.6.1
 */